#!/usr/bin/env node
// 快速的创建两个文件
const fs = require("fs")

const arg = process.argv[2]

fs.writeFile(
  `./src/${arg}.test.ts`,
  `import { ${arg} } from "./${arg}"

describe("${arg} test", () => {
  it("1", () => {
    expect(${arg}()).toBe(0)
  })
})
`,
  () => {}
)

fs.writeFile(
  `./src/${arg}.ts`,
  `function ${arg}() {
  return 0
}

export { ${arg} }
`,
  () => {}
)

fs.writeFile(`./src/${arg}.md`, "", () => {})
